<html>
<LINK REL=StyleSheet HREF="style.css" TYPE="text/css">
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=droid+sans">
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.js"></script>
<script type="text/javascript" src="main.js"></script>
<script type='text/javascript'>

$(document).ready(function() {
	$.ajax({contentType:'multipart/form-data'});
	getMessagesForced();
	setInterval('getMessages()', 3000);
	$('#rightcolumn').toggle();
	$('#userinput').keyup(function(e) {  if(e.keyCode == 13) { var msg= $('#userinput').val(); sendMessage(msg,'message'); $(this).val('');  }   });
	$('#searchtext').keyup(function(e) {	var msg = $("#searchtext").val(); dosearch(); });	
	$('#userinput').focus();
	$('.header').hover(  function(){$(this).addClass('highlight');},    function(){$(this).removeClass('highlight');}  );
       	$('.userinput').hover(  function(){$(this).addClass('highlight');}, function(){$(this).removeClass('highlight');}  );
	$('#userinput').blur(function(e) {showsearch();});
	$('#searchtext').blur(function(e) {showmessages();});
});
</script>
<body>
<div class='header'>PyWebChat</div>
<div id="maincontainer" class="maincontainer">
<div class="leftcolumn" id="leftcolumn">
	<div id="chatinput" class="chatinput">
		<TEXTAREA id="userinput" class="userinput textbox"></TEXTAREA><br/>
		<a href='' onclick='logout()'>logout</a>
		<a href='#' tabIndex="-1" class='changemode' onclick="showsearch();">search</a>
	</div>
		<div id='notification' class='notification'></div>
	<div id='error' class='error'></div>
	<div id='messages' class='chatlog'></div>

</div>
<div id="rightcolumn" class="rightcolumn">
	<div id="searchinput" class="chatinput">
		<TEXTAREA id="searchtext" class="userinput textbox"></TEXTAREA><br/>
		<a href='' onclick='logout()'>logout</a>
		<a href='#' tabIndex="-1" class='changemode' onclick="showmessages();">chat</a>
	</div>

	<div id='searchresults' class="chatlog"></div>
</div>
<div id='onlinewrapper' class='onlinewrapper'>
		<a tabIndex="-1" href=''>Online Now:</a>
		<div id='online' class='online'></div>
	</div>
</div>
</body>
</html>

